<?php
//error_reporting(0); 
//site setting
header("Content-type: text/html; charset=utf-8");
//@session_start();
set_time_limit(0);

//MySql
define("DATABASE_CONNECT_HOST","localhost");
define("DATABASE_CONNECT_USER","fjs");
define("DATABASE_CONNECT_PASS","123456");
define("DATABASE_NAME","fjs");
define("ONEPAGE_SIZE","10");

define("GETPAGE_TIMEOUT","10");
//Model
define("ROOT_PATH", str_replace("\\","/",realpath( dirname(__FILE__).DIRECTORY_SEPARATOR."..").DIRECTORY_SEPARATOR ));
define("CONFIG_PATH", ROOT_PATH."config".DIRECTORY_SEPARATOR);
define("CONFIG_LANG_PATH", CONFIG_PATH."lang".DIRECTORY_SEPARATOR);
define("CONFIG_API_PATH", CONFIG_PATH."api".DIRECTORY_SEPARATOR);
define("CONFIG_API_SITES_PATH", CONFIG_API_PATH."sites".DIRECTORY_SEPARATOR);
define("CONFIG_API_MODEL_PATH", CONFIG_API_PATH."model".DIRECTORY_SEPARATOR);
define("COMMON_PATH", ROOT_PATH."common".DIRECTORY_SEPARATOR);
define("CLASS_PATH", COMMON_PATH."class".DIRECTORY_SEPARATOR);
define("LIB_PATH", COMMON_PATH."lib".DIRECTORY_SEPARATOR);
define("DATA_PATH", COMMON_PATH."data".DIRECTORY_SEPARATOR);
//Control
define("WEBSERVICE_PATH", ROOT_PATH."WebService".DIRECTORY_SEPARATOR);
//View
define("TEMPLATE_PATH", ROOT_PATH."template".DIRECTORY_SEPARATOR);
define("CSS_PATH", TEMPLATE_PATH."css".DIRECTORY_SEPARATOR);
define("HTML_PATH", TEMPLATE_PATH."html".DIRECTORY_SEPARATOR);
define("IMG_PATH", TEMPLATE_PATH."images".DIRECTORY_SEPARATOR);
define("JS_PATH", TEMPLATE_PATH."javascript".DIRECTORY_SEPARATOR);

define("CACHE_PATH", ROOT_PATH."cache".DIRECTORY_SEPARATOR);
define("CACHE_SHOPPING", true);
define("CACHE_TIME", "24 hours");

define("HTTP_URL", "http://www.fromjapan.co.jp/");
//define("HTTPS_URL", "https://www.fromjapan.co.jp/");
//入扎　yahoo
define("YAHOO_AUCTION_URL", HTTP_URL."auction/yahoo/input?lang={0}&AuctionId={1}");
//入扎　その他
define("SHOPPING_URL", HTTP_URL."special/order/confirm?lang={0}&code={1}&siteFlg={2}");
//預約入扎
define("YAHOO_SNIPER_URL", HTTP_URL."auction/yahoo/sniper/input?lang={0}&item_addr={1}");
//ウオッチリスト
define("WATCHLIST_URL", HTTP_URL."member/watchreg.php?lang={0}&item_addr={1}");
//見積もり
define("CALCULATOR_URL", HTTP_URL."calculator/calcu.php?lang={0}&price={1}");

include_once CLASS_PATH.'common.php';
include_once CLASS_PATH.'curl.class.php';
$lang[0] = pageload();
switch($lang[0]){
	case "tw":
		define("LANG","tw");
		break;
	case "cn":
		define("LANG","cn");
		break;
	case "ja":
		define("LANG","ja");
		break;
	case "en":
		define("LANG","en");
		break;
	default:
		define("LANG","en");
		break;
}